package cn.xunjie.ymcc.feignClients;

import cn.xunjie.ymcc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserFeignClientFallback implements FallbackFactory<UserFeignClient> {

    @Override
    public UserFeignClient create(Throwable throwable) {
        return new UserFeignClient() {
            @Override
            public JSONResult loadByPhone(String phone) {
                return JSONResult.success();
            }
        };
    }
}
